package com.xyf.sys.service.impl;

import com.xyf.sys.domain.SysProductOption;
import com.xyf.sys.mapper.SysProductOptionMapper;
import com.xyf.sys.service.IProductOptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.List;

/**
 * @Author R-H
 * @Date 2024/5/142007
 * @Description
 */
@Service
public class ProductOptionServiceImpl implements IProductOptionService {

    @Autowired
    private SysProductOptionMapper productOptionMapper;


    @Override
    public List<SysProductOption> getList() {
        return productOptionMapper.selectList();
    }

    @Override
    public List<SysProductOption> getList(List<Long> ids) {
        if (CollectionUtils.isEmpty(ids)){
            return null;
        }
        return productOptionMapper.selectByIds(ids);
    }
}
